package com.yboot.module.system.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yboot.starter.common.core.web.validation.InsertGroup;
import com.yboot.starter.common.core.web.validation.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 菜单表
 * @author yangcs
 * @date 2025-08-29
 */
@Data
public class SysMenuDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @NotBlank(message = "id不能为空", groups = {UpdateGroup.class})
    private String id;
    /**
     * 标题
     */
    @NotBlank(message = "title不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String title;
    /**
     * 上级菜单ID
     */
    @NotBlank(message = "parentId不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String parentId;
    /**
     * 类型（1：目录；2：菜单；3：按钮）
     */
    @NotBlank(message = "type不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String type;
    /**
     * 路由地址
     */
    private String path;
    /**
     * 组件名称
     */
    private String name;
    /**
     * 组件路径
     */
    private String component;
    /**
     * 重定向地址
     */
    private String redirect;
    /**
     * 图标
     */
    private String icon;
    /**
     * 是否外链
     */
    private Boolean isExternal;
    /**
     * 是否缓存
     */
    private Boolean isCache;
    /**
     * 是否隐藏
     */
    private Boolean isHidden;
    /**
     * 权限标识
     */
    private String permission;
    /**
     * 排序
     */
    @NotNull(message = "sort不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Integer sort;
    /**
     * 状态（1：启用；2：禁用）
     */
    @NotBlank(message = "status不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String status;
    /**
     * 删除标识
     */
    private String deleteFlag;
}
